import axios from '@/utils/request'
const base = '/operation'

export function listChargeRecords(params) {
  return axios({
    url: `${base}/chargeOrders`,
    method: 'get',
    params: params
  })
}

export function prepareOrder(data) {
  return axios({
    url: `${base}/chargeOrders`,
    method: 'post',
    data
  })
}

export function closeOrder(id) {
  return axios({
    url: `${base}/chargeOrders/` + id,
    method: 'put'
  })
}

export function queryOrder(id) {
  return axios({
    url: `${base}/chargeOrders/` + id,
    method: 'get'
  })
}
